package com.neutech.solar.entity;

import com.neutech.solar.constant.Constant;
import com.neutech.solar.util.GameUtil;

import java.awt.*;

/**
 * @author 刘昱含
 * @date 2021/7/22 11:40
 */
public class Sun extends AbstractSolarObject {
    public Sun(){
        this.img = GameUtil.getImage("SUN.png");
        this.width = img.getWidth(null);
        this.height = img.getHeight(null);
        this.x = Constant.WINDOW_WIDTH / 2 - this.width / 2;
        this.y = Constant.WINDOW_HEIGHT / 2 - this.height / 2;
    }
    @Override
    public void draw(Graphics g) {
        g.drawImage(img,x,y,null);
    }
}
